// curriculum/componts/Exchange/Exchange.js
Component({
  data: {
      showReply: false,
      replyHeight: ''
  },
  methods:{
    toggleReply() {
        const animation = wx.createAnimation({
          duration: 300,
          timingFunction: 'ease'
        });
    
        if (!this.data.showReply) {
          animation.height('auto').step();
          this.setData({
            showReply: true,
            replyHeight: animation.export()
          });
        } else {
          animation.height(0).step();
          this.setData({
            showReply: false,
            replyHeight: animation.export()
          });
        }
      }
  }
 
})